package com.itheima.demo1;

import java.util.Arrays;

public class Exerci1 {

    public static void main(String[] args) {
      int[] arr={100,34,44,99,8};
      int max=arr[0];
      int min=arr[0];
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] > max) {
                max=arr[i];
            }
            if (arr[i] < min) {
                min=arr[i];
            }
        }
        System.out.println(max);
        System.out.println(min);
    }
}
